home *** CD-ROM | disk | FTP | other *** search
/ AMIGA-CD 2 / Amiga-CD - Volume 2.iso / ungepackte_daten / 1992 / 10 / 02 / tips.ampk / Pythagoras / Abstand.bas < prev    next >
Encoding:
BASIC Source File  |  1995-06-01  |  178 b   |  9 lines

  1. Abstand 200,20,50,120,x
  2. PRINT "Der Abstand beträgt";x;"Pixel"
  3. END
  4.  SUB Abstand (x1%,y1%,x2%,y2%,z) STATIC
  5.  dx% = x1%-x2%
  6.  dy% = y1%-y2%
  7.  z = SQR(dx%^2-dy%^2)
  8. END SUB ´© 1992 M&T
  9.